package com.oracle.service;

import com.oracle.dao.UserDao;
import com.oracle.entity.User;

public class UserService {
    public User register(String username, String password){
        UserDao userDao = new UserDao();
        for (User user:userDao.getList()
             ) {
            if(user.getUsername().equals(username)&&user.getPassword().equals(password))
                return user;
            
        }
        userDao.addList(username, password);
        return null;

    }

}
